package Main;

import javax.microedition.lcdui.Display;
import javax.microedition.media.MediaException;
import javax.microedition.media.Player;
import javax.microedition.midlet.*;

import Common.CRes;
import Data.DataGame;


public class Midlet extends MIDlet{

	public static Midlet instance;
	static CCanvas canvas;
	
	
	public Midlet() {
		
		if (canvas == null) {
			canvas = new CCanvas();
		}
		 CCanvas.isRunning = true;
		 instance = this;
		 Display.getDisplay(this).setCurrent(canvas);
		 canvas.start();
		
	}
	protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
		// TODO Auto-generated method stub
		notifyDestroyed();
	}

	protected void pauseApp() {
		// TODO Auto-generated method stub
		notifyPaused();
	}

	protected void startApp() throws MIDletStateChangeException {
		// TODO Auto-generated method stub
		
	}
	public void run() {
		// TODO Auto-generated method stub
		
	}

}
